home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / djgpp / contrib / pdcurs22 / src / portable / inch.c < prev    next >
Encoding:
C/C++ Source or Header  |  1995-01-26  |  3.6 KB  |  114 lines

  1. /*
  2. ***************************************************************************
  3. * This file comprises part of PDCurses. PDCurses is Public Domain software.
  4. * You may use this code for whatever purposes you desire. This software
  5. * is provided AS IS with NO WARRANTY whatsoever.
  6. * Should this software be used in another application, an acknowledgement
  7. * that PDCurses code is used would be appreciated, but is not mandatory.
  8. *
  9. * Any changes which you make to this software which may improve or enhance
  10. * it, should be forwarded to the current maintainer for the benefit of 
  11. * other users.
  12. *
  13. * The only restriction placed on this code is that no distribution of
  14. * modified PDCurses code be made under the PDCurses name, by anyone
  15. * other than the current maintainer.
  16. * See the file maintain.er for details of the current maintainer.
  17. ***************************************************************************
  18. */
  19. #define    CURSES_LIBRARY    1
  20. #include <curses.h>
  21.  
  22. /* undefine any macros for functions defined in this module */
  23. #undef    inch
  24. #undef    winch
  25. #undef    mvinch
  26. #undef    mvwinch
  27.  
  28. /* undefine any macros for functions called by this module if in debug mode */
  29. #ifdef PDCDEBUG
  30. #  undef    move
  31. #  undef    wmove
  32. #endif
  33.  
  34. #ifdef PDCDEBUG
  35. char *rcsid_inch  = "$Id$";
  36. #endif
  37.  
  38. /*man-start*********************************************************************
  39.  
  40.   Name:                                                          inch
  41.  
  42.   Synopsis:
  43.       chtype inch(void);
  44.       chtype winch(WINDOW *win);
  45.       chtype mvinch(int y, int x);
  46.       chtype mvwinch(WINDOW *win, int y, int x);
  47.  
  48.   X/Open Description:
  49.  
  50.      NOTE: All these functions are implemented as macros.
  51.  
  52.   PDCurses Description:
  53.      Depending upon the state of the raw character output, 7- or
  54.      8-bit characters will be output.
  55.  
  56.   X/Open Return Value:
  57.      All functions return OK on success and ERR on error.
  58.  
  59.   X/Open Errors:
  60.      No errors are defined for this function.
  61.  
  62.   Portability                             X/Open    BSD    SYS V
  63.                                           Dec '88
  64.       inch                                  Y        Y       Y
  65.       winch                                 Y        Y       Y
  66.       mvinch                                Y        Y       Y
  67.       mvwinch                               Y        Y       Y
  68.  
  69. **man-end**********************************************************************/
  70.  
  71. /***********************************************************************/
  72. chtype    inch(void)
  73. /***********************************************************************/
  74. {
  75. #ifdef PDCDEBUG
  76.     if (trace_on) PDC_debug("inch() - called\n");
  77. #endif
  78.  
  79.     return( stdscr->_y[stdscr->_cury][stdscr->_curx] );
  80. }
  81. /***********************************************************************/
  82. chtype    winch(WINDOW *win)
  83. /***********************************************************************/
  84. {
  85. #ifdef PDCDEBUG
  86.     if (trace_on) PDC_debug("winch() - called\n");
  87. #endif
  88.  
  89.     return( win->_y[win->_cury][win->_curx] );
  90. }
  91. /***********************************************************************/
  92. chtype    mvinch(int y, int x)
  93. /***********************************************************************/
  94. {
  95. #ifdef PDCDEBUG
  96.     if (trace_on) PDC_debug("mvinch() - called\n");
  97. #endif
  98.  
  99.     (void)(move(y,x));
  100.     return( stdscr->_y[stdscr->_cury][stdscr->_curx] );
  101. }
  102. /***********************************************************************/
  103. chtype    mvwinch(WINDOW *win, int y, int x)
  104. /***********************************************************************/
  105. {
  106. #ifdef PDCDEBUG
  107.     if (trace_on) PDC_debug("mvwinch() - called\n");
  108. #endif
  109.  
  110.     (void)(wmove(win,y,x));
  111.     return( win->_y[win->_cury][win->_curx] );
  112. }
  113.